import { request } from "../request";
import { API, ADMINAPI } from "../const";

export function getSwiperList() {
  return request({
    url: `${ADMINAPI}/swiper/list`,
  });
}

export function addSwiper(data) {
  return request({
    url: `${ADMINAPI}/swiper`,
    method: "post",
    data,
  });
}

export function deleteSwiper(id) {
  return request({
    url: `${ADMINAPI}/swiper/${id}`,
    method: "delete",
  });
}

export function updateSwiper(data) {
  return request({
    url: `${ADMINAPI}/swiper/${data.id}`,
    method: "put",
  });
}
